package top.lt.lt_ssm.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import top.lt.lt_ssm.bean.product;
import top.lt.lt_ssm.dao.ProductDao;
import top.lt.lt_ssm.service.ProductService;

@Service
public class ProductServiceImpl implements ProductService{

	
	@Resource
	private ProductDao productDao;
	
	@Override
	public List<product> getall() {
		return productDao.getall();
	}

	@Override
	public int delBypid(int id) {
		return productDao.delBypid(id);
	}

	@Override
	public int updBypid(product pro) {
		int pr = productDao.updBypid(pro);
		return pr;
	}
	@Override
	public product getByPid(int pid) {
		return productDao.getByPid(pid);
	}

	@Override
	public List<product> getByid(int sid) {
		return productDao.getByid(sid);
	}

	@Override
	public List<product> gatByname(String pname) {
		return productDao.gatByname(pname);
	}

	@Override
	public int add(product pro) {
		return productDao.add(pro);
	}
}